<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>收益详情</title>

    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css"/>

</head>
<body>
<div id="blank" class="header" style="border:1px solid #E6E6E6">
    <div v-back.tapmode class="back"></div>
    <span class="title">收益详情</span>
</div>
<div id="app" class="main-container" style="background: white;">
    <div class="row-container" style="margin-top:0px">
        <div class="income-row">
            <div>
                <span style="color: #808080;">佣金金额</span>
                <span style="float: right">{{profitDetail.profit}}元</span>
            </div>
        </div>
        <div class="income-row">
            <div>
                <span style="color: #808080;">佣金来源</span>
                <p style="float: right;width: 54%;text-align: right">{{profitDetail.from_str}}</p>
            </div>
        </div>
        <div class="income-row">
            <div>
                <span style="color: #808080;">佣金状态</span>
                <p style="float: right;">{{profitDetail.state_str}}</p>
            </div>
        </div>
        <div class="income-row">
            <div>
                <span style="color: #808080;">结算日期</span>
                <p style="float: right;">{{profitDetail.date_add | time}}</p>
            </div>
        </div>
        <div class="income-row">
            <div>
                <span style="color: #808080;">异常原因</span>
                <p style="float: right;width: 62%;text-align: right">{{profitDetail.error}}</p>
            </div>
        </div>
    </div>
</div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/url.js"></script>
<script>

    var profitDetail;
    apiready = function () {
        setBSImg();
        new Vue({
            el: "#blank"
        });
        var param = api.pageParam;
        var data = {
            member_id: getPrefs('member_id'),
            type: param.type,
            id: param.id
        };
        var callback = function (ret) {
            profitDetail = ret.content;
            initApp();
            api.parseTapmode();
        };
        pinet.post(URL.myProfitDetail, data, callback);
        addListeners();
    };
    function initApp() {
        new Vue({
            el: "#app",
            data: {
                profitDetail: profitDetail
            }
        })
    }

    function addListeners() {
        api.addEventListener({
            name: 'viewappear'
        }, function () {
            onPageStart();
        });

        api.addEventListener({
            name: 'viewdisappear'
        }, function (ret, err) {
            onPageEnd();
        });

        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            onPageEnd();
            api.closeWin();
        });
    }


</script>
</html>
